home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Tools - Objects / C++ / MPW C++ 3.1b1 / Examples / CPlusExamples / TESampleGlue.a < prev    next >
Text File  |  1989-09-29  |  2KB  |  67 lines

  1. *
  2. *    Apple Macintosh Developer Technical Support
  3. *
  4. *    MultiFinder-Aware Simple TextEdit Sample Application
  5. *
  6. *    CPlusTESample
  7. *
  8. *    TESampleGlue.a        -    Assembler Source
  9. *
  10. *    Copyright © 1988, 1989 Apple Computer, Inc.
  11. *    All rights reserved.
  12. *
  13. *    Versions:    
  14. *            1.10                     07/89
  15. *            1.00                     04/89
  16. *
  17. *    Components:
  18. *            CPlusTESample.make        July 9, 1989
  19. *            TApplicationCommon.h    July 9, 1989
  20. *            TApplication.h            July 9, 1989
  21. *            TDocument.h                July 9, 1989
  22. *            TECommon.h                July 9, 1989
  23. *            TESample.h                July 9, 1989
  24. *            TEDocument.h            July 9, 1989
  25. *            TApplication.cp            July 9, 1989
  26. *            TDocument.cp            July 9, 1989
  27. *            TESample.cp                July 9, 1989
  28. *            TEDocument.cp            July 9, 1989
  29. *            TESampleGlue.a            July 9, 1989
  30. *            TApplication.r            July 9, 1989
  31. *            TESample.r                July 9, 1989
  32. *
  33.  
  34. ;
  35. ;    AsmClikLoop
  36. ;
  37. ;    This routine gets called by the TextEdit Manager from TEClick.
  38. ;    It calls the old, default click loop routine that scrolls the
  39. ;    text, and then calls our own Pascal routine that handles
  40. ;    tracking the scroll bars to follow along.  It doesn't bother
  41. ;    with saving registers A0 and D0, because they are trashed
  42. ;    anyway by TextEdit.
  43. ;
  44.  
  45. AsmClikLoop    PROC        EXPORT
  46.  
  47.             IMPORT        GETOLDCLIKLOOP
  48.             IMPORT        PASCALCLIKLOOP
  49.             
  50.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  51.             
  52.             CLR.L        -(SP)                ; make space for procedure pointer
  53.             JSR            GETOLDCLIKLOOP        ; get the old clikLoop
  54.             MOVEA.L        (SP)+,A0            ; into A0
  55.             
  56.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  57.             JSR            (A0)                ; and execute old clikLoop
  58.  
  59.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  60.             JSR            PASCALCLIKLOOP        ; do our clikLoop
  61.             MOVEQ        #1,D0                ; clear the zero flag so TextEdit keeps going
  62.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  63.             RTS
  64.  
  65.             END 
  66.  
  67.